<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    body {
        margin: 0;
    }
    
    .demo {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    
    .demo1 {
        height: 100px;
        width: 100px;
        background: red;
    }
</style>

<body>
    <div class="demo">
        <div class="demo1"></div>
    </div>
</body>

</html>